package com.iot.core.data.entity;

import com.iot.core.data.BaseEntity;
import com.iot.core.data.IdNameDto;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Schema(name = "在线用户表",description = "包含历史")
@Table("htuserlogin")
@Data
public class HtUserLogin extends BaseEntity {

    @Schema(name = "Token",description = "")
    @NotBlank(message = "Token不能为空")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  token ="";

    @Schema(name = "姓名",description = "")
    @NotBlank(message = "姓名不能为空")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  name ="";

    @Schema(name = "机构编码",description = "")
    private  Long  htdeptId =0L;

    @Schema(name = "机构名称",description = "")
    @Size(min =0,max = 100,message = "长度范围0-100")
    private  String  htdeptName ="";

    @Schema(name = "角色数据",description = "BaseDto 数组,json格式")
    @Size(min =0,max = 200,message = "长度范围0-200")
    private  String  htroleData ="";

    @Schema(name = "HTRoles",description = "")
    @Column(ignore = true)
    private  List<IdNameDto>  htroles ;

    @Schema(name = "平台编号",description = "")
    private  Long  htplatId =0L;

    @Schema(name = "登录方式",description = "Appver、IMSI")
    @Size(min =0,max = 10,message = "长度范围0-10")
    private  String  loginway ="";

    @Schema(name = "额外信息",description = "网站、小程序、安卓终端")
    private  String  extra ="";

    @Schema(name = "IP",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  ip ="";

    @Schema(name = "OS",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  os ="";

    @Schema(name = "IMSI",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  imsi ="";

    @Schema(name = "浏览器",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  browser ="";

    @Schema(name = "App版本",description = "")
    @Size(min =0,max = 20,message = "长度范围0-20")
    private  String  appver ="";

    @Schema(name = "创建日期",description = "")
    private  Date  crtDt ;

    @Schema(name = "用户编号",description = "")
    private  Long  crtUid =0L;

    @Schema(name = "机构编号",description = "")
    private  Long  crtDid =0L;

    @Schema(name = "更新日期",description = "")
    private  Date  edtDt ;

    @Schema(name = "更新用户编号",description = "")
    private  Long  edtUid =0L;

    @Schema(name = "最近访问地址",description = "")
    @Size(min =0,max = 20,message = "长度范围0-20")
    private  String  edtUrl ="";

    @Schema(name = "在线状态",description = "")
    private  boolean  online ;

    @Schema(name = "注销日期",description = "")
    private  Date  logoutDt  ;

    @Schema(name = "注销备注",description = "")
    @Size(min =0,max = 100,message = "长度范围0-100")
    private  String  logoutMemo ="";

    @Schema(name = "是否调试",description = "")
    private  boolean  debug ;



}
